package com.info.zhiduoduo.repository.entity.weixin;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bob
 * @since 2018-12-23
 */
@Data
@Accessors(chain = true)
@TableName("zdd_wx_accesstoken")
public class WxAccesstoken extends Model<WxAccesstoken> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 微信公众号全局token
     */
    @TableField("access_token")
    private String accessToken;
    /**
     * 凭证有效时间，单位：秒
     */
    @TableField("expires_in")
    private Integer expiresIn;
    /**
     * js凭证
     */
    private String jsticket;
    /**
     * 创建时间
     */
    private Date createtime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
